package com.ruoyi.heima.news.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import com.ruoyi.heima.news.enums.NewsStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

@Data
@Alias("PoNews") // 解决mybatis-plus为类注册类型别名时出现冲突
@TableName("tb_news")
@ApiModel(value="News对象", description="")
public class News extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "新闻ID")
    @Excel(name = "新闻ID", sort = 1)
    @TableId(value = "news_id", type = IdType.AUTO)
    private Long newsId;

    @ApiModelProperty(value = "新闻标题")
    @Excel(name = "标题", sort = 2)
    private String title;

    @ApiModelProperty(value = "新闻类型")
    @Excel(name = "类型", sort = 3)
    private Integer typeId;

    @ApiModelProperty(value = "新闻内容")
    @Excel(name = "内容", sort = 4)
    private String content;

    @ApiModelProperty(value = "延迟发布时间")
    @Excel(name = "延迟时间", sort = 5, cellType = Excel.ColumnType.NUMERIC)
    private Integer delayTime;

    @ApiModelProperty(value = "来源")
    @Excel(name = "来源", sort = 6)
    private String source;

    /**
     * NORMAL: 0 正常
     * DELAY_PUBLISH: 1 延迟发布
     * PUBLISH: 2 发布
     * DELETED: 3 删除
     */
    @ApiModelProperty(value = "状态")
    @Excel(name = "状态", sort = 11)
    private NewsStatus status;

    @ApiModelProperty(value = "通知ID")
    @Excel(name = "通知公告ID", sort = 13, cellType = Excel.ColumnType.NUMERIC)
    private Long noticeId;
}
